//
//  XYHUDManager.h
//  XYCustomAlertView
//
//  Created by gao chenyang on 2019/11/1.
//  Copyright © 2019 gao chenyang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XYProgressHUD.h"
#import "XYProgressView.h"
NS_ASSUME_NONNULL_BEGIN
typedef void (^HideToastComplete)(void);
@interface XYHUDManager : NSObject
#pragma mark - 简短提示语 会存放队列中，一个一个展示 当页面结束后清空对应页面的toast队列  view必须存在
//默认不阻碍UI   前四个默认都是添加到window上
+(void)showBriefToast:(NSString *)toast;

+ (void)showBriefToast:(NSString *)message time:(NSInteger)showTime;

+ (void)showBriefToast:(NSString *) message
             isBlockUI:(BOOL)isBlockUI;

+ (void)showBriefToast:(NSString *)message
                  time:(NSInteger)showTime
             isBlockUI:(BOOL)isBlockUI;

+ (void)showBriefToast:(NSString *)message
                  time:(NSInteger)showTime
             isBlockUI:(BOOL)isBlockUI
                inView:(nullable UIView *)view;

+ (void)showInTellToastAttriString:(NSAttributedString *)string InView:(nullable UIView *)view completion:(void(^)(XYProgressHUD *hud))completion;

//清空队列中的所有弹框
+(void)clearAllToast;
#pragma mark - 长时间的提示语
+ (void)showPermanentMessage:(NSString *)message
                      inView:(nullable UIView *) view
             isAvalibleTouch:(BOOL)isAvalibleTouch
           hideToastComplete:(nullable HideToastComplete)complete;

#pragma mark - 网络加载提示用
+ (void) showLoadingInView:(nullable UIView *)view;

+ (void) showLoadingWithTitle:(NSString *) title
                       inView:(nullable UIView *)view
            hideToastComplete:(nullable HideToastComplete)complete;

+ (void)showLoadingWithTitle:(NSString *)title
                      inView:(nullable UIView *)view
             isAvalibleTouch:(BOOL)isAvalibleTouch
           hideToastComplete:(nullable HideToastComplete)complete;

#pragma mark - 自定义网络加载提示
+ (void) showCustomLoadingInView:(nullable UIView *)view;

+ (void) showCustomLoadingWithTitle:(nullable NSString *)title
                             inView:(nullable UIView *)view
                  hideToastComplete:(nullable HideToastComplete)complete;

+ (void)showCustomLoadingWithTitle:(nullable NSString *)title
                            inView:(nullable UIView *)view
                   isAvalibleTouch:(BOOL)isAvalibleTouch
                 hideToastComplete:(nullable HideToastComplete)complete;
//--------------项目专用--------------------
+ (void)showCustomBlueLoadingWithTitle:(nullable NSString *)title
                               isLarge:(BOOL)isLarge
                                inView:(nullable UIView *)view
                       isAvalibleTouch:(BOOL)isAvalibleTouch
                     hideToastComplete:(nullable HideToastComplete)complete;

+ (void)showCustomWhiteLoadingWithTitle:(nullable NSString *)title
                                 inView:(nullable UIView *)view
                        isAvalibleTouch:(BOOL)isAvalibleTouch
                      hideToastComplete:(nullable HideToastComplete)complete;
#pragma mark - 加载在window上的提示框
+(void)showLoading;

+ (void)showLoadingWithTitle:(NSString *)title;

+(void)showPermanentToast:(NSString *)toast;

#pragma mark - 下载进度视图
+ (XYLoopProgressView *)showProgressViewWithTitle:(NSString *)title;

+ (XYLoopProgressView *)showProgressViewWithTitle:(NSString *)title inView:(nullable UIView *)view;
#pragma mark - 隐藏提示框
+(void)hideToast;

+(void)hideToastAnimated:(BOOL)animated;
@end

@interface XYGloomyView : UIView<UIGestureRecognizerDelegate>
@property (nonatomic, assign) BOOL isAvalibleTouch;

@property (nonatomic, copy) HideToastComplete hideToastComplete;
@end
NS_ASSUME_NONNULL_END
